<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>OpenShoe: Initialization routines</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />

<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>

</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">OpenShoe
   &#160;<span id="projectnumber">1.0</span>
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.5.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">Initialization routines</div>  </div>
<div class="ingroups"><a class="el" href="group__nav__eq.html">OpenShoe filtering algorithms</a></div></div>
<div class="contents">

<p>Routines for initializing the system. Only coarse initial alignment is implemented.  
<a href="#details">More...</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="func-members"></a>
Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__init.html#ga8b0f8dc8c2ae1ff3f5e4f27284cf8e77">initialize_navigation_algorithm</a> (void)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Function for initializing the navigation algorithm.  <a href="#ga8b0f8dc8c2ae1ff3f5e4f27284cf8e77"></a><br/></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<p>Routines for initializing the system. Only coarse initial alignment is implemented. </p>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="ga8b0f8dc8c2ae1ff3f5e4f27284cf8e77"></a><!-- doxytag: member="nav_eq.c::initialize_navigation_algorithm" ref="ga8b0f8dc8c2ae1ff3f5e4f27284cf8e77" args="(void)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void initialize_navigation_algorithm </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Function for initializing the navigation algorithm. </p>
<p>This function initializes the navigation algorithm and should during the initialization of the navigation system be called every time new IMU-data have been read from the IMU. Before the initialization is started the flag <em>initialize_flag</em> should be set to true, and the counter <em>initialize_sample_ctr</em> to zero. The initialization is finished when the flag <em>initialize_flag</em> becomes false.</p>
<p>The initialization function first runs an initial alignment of the navigation system, where the roll and pitch are estimated from the average of the accelerometer readings. Then, the function sets the initial navigation states (position, velocity, and quaternions) and the initial Kalman filter covariance.</p>
<dl class="note"><dt><b>Note:</b></dt><dd>The navigation system most be stationary during the initialization, and the number of samples used in the initial alignment most be larger than the length of the zero-velocity detector window.</dd></dl>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[out]</td><td class="paramname">position</td><td>The position estimate of the navigation system. </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">velocity</td><td>The velocity estimate of the navigation system. </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">quaternions</td><td>The orientation estimate of the navigation system. </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">cov_vector</td><td>The vector representation of the Kalman filter covariance matrix. </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">initialize_flag</td><td>A flag that should be set to true when initialization is started and that becomes false when the initialization is finished. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">nr_of_inital_alignment_samples</td><td>The number of samples used in the initial alignment. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">initial_heading</td><td>The initial heading of the navigation system. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">initial_pos</td><td>The initial position of the navigation system. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">sigma_initial_position</td><td>The standard deviations of the uncertainties in the initial position. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">sigma_initial_velocity</td><td>The standard deviations of the uncertainties in the initial velocity. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">sigma_initial_attitude</td><td>The standard deviations of the uncertainties in the initial attitude. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Defines</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>



<hr class="footer"/><address class="footer"><small>
Generated on Tue Dec 20 2011 12:12:37 for OpenShoe by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.7.5.1
</small></address>

</body>
</html>
